/**
 * main.cpp
 * @author Bao Linfeng
 * @brief WIT 0x55 数据解码程序
 * @version 1.0
 * @note  usage: wit_decoder infile outfile
 * LAT and H is for local gravity, whrere LAT is local Latitude in degree,H is local Height, both in WGS84
 * Output: time[s] gx,gy,gz[rag/s] ax,ay,az[m/s^2]
 * **/



#include <iostream>
#include <fstream>
#include "nav_struct.h"
#include "imu_decoder.h"
#include "nav_io.h"
#include "WGS84.h"

using namespace std;

/*to get g*/
const double LAT = 39.98012778;
const double H = 40;
const int SAMPLE_RATE = 1000;

int main(int argc, char *argv[]) {
    if (argc < 3) {
        cout << "usage: stim300_decoder infile_path outfile_path" << endl;
        return -1;
    }
    wgs84.update_g(LAT, H);
    WitMpu9250 wit(SAMPLE_RATE, wgs84.g);
    wit.decode_file(argv[1], argv[2]);
    return 0;
}
